<template>
	<view class="container-topic-nav">
		<view class="container-topic-nav-body">
			
			<slot><view class="box-arrow-title">
				<image class="icon-arrow" src="/static/icon_arrow_left.png" @tap="onHistory"></image>
				<text>{{title}}</text>
			</view></slot>
		</view>
	</view>
</template>

<script setup>
	const props = defineProps({
		title: {
			type: String,
			default: ''
		}
	})
	const onHistory = () => {
		uni.navigateBack()
	}
</script>

<style lang="less" scoped>
	.container-topic-nav {
		position: relative;
		width: 100%;
		padding: 18rpx 32rpx;
		box-sizing: border-box;

		.container-topic-nav-body {
			position: relative;
			width: 100%;
			height: 80rpx;
			background: #121F2B;
			border-radius: 24rpx;
			padding-left: 32rpx;
			padding-right: 32rpx;
			box-sizing: border-box;
			display: flex;
			display: -webkit-flex;
			flex-direction: row;
			align-items: center;
			justify-content: space-between;

			font-size: 34rpx;
			// font-family: PingFang SC;
			font-weight: 500;
			color: #FFFFFF;
			.box-arrow-title{
				position: relative;
				height: 100%;
				display: flex;
				display: -webkit-flex;
				flex-direction: row;
				align-items: center;
				.icon-arrow {
				position: relative;
				width: 22rpx;
				height: 38rpx;
				margin-right: 25rpx;
			}
			}
			
		}
	}
</style>